package practicedemo45;

public class Test {
    public static void main(String[] args) {
        //1.创建StringBuilder的对象
        StringBuilder sb =new StringBuilder("test");

        //2.添加元素
        sb.append(1);
        sb.append(3.14);
        sb.append(true);
        sb.append("你好");
        System.out.println(sb);

        //3.删除索引元素
//        System.out.println(sb.delete(1,3));
//        System.out.println(sb.deleteCharAt(13));

        //4.反转
//        System.out.println(sb.reverse());

        //5.长度
//        System.out.println(sb.length());

        //6.规范，使用完后记得toString()
//        System.out.println(sb.toString());
    }
}
